<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="../js/style.css" />
<title>湖北包装网会员管理系统</title></head>
<body>
<script type="text/javascript">
function pass_confirm()
  {
  
   if(confirm("是否通过审核?"))
    {
       var al = document.getElementsByName("r");
       var user_ids='';
       for(var i=0;i<al.length;i++){
       		if(al[i].checked){
       			if(user_ids==""){
       				user_ids = al[i].value;
       			}else{
       				user_ids = user_ids +","+ al[i].value;
       			}
       		}
       }
       if(user_ids==''){
       		alert("您未选择任何用户!");
       		return;
       }
       window.location.href="../user/passCompanyUser.action?user_ids="+user_ids;
    }
  }
  
  function unpass_confirm()
  {
  
   if(confirm("是否不通过审核?"))
    {
       var al = document.getElementsByName("r");
       var user_ids='';
       for(var i=0;i<al.length;i++){
       		if(al[i].checked){
       			if(user_ids==""){
       				user_ids = al[i].value;
       			}else{
       				user_ids = user_ids +","+ al[i].value;
       			}
       		}
       }
       if(user_ids==''){
       		alert("您未选择任何用户!");
       		return;
       }
       window.location.href="../user/UnpassCompanyUser.action?user_ids="+user_ids;
    }
  }
</script>

<jsp:include page="adminTitle.jsp" flush="true"></jsp:include>
<div id="mainpage">
  <div class="bodytitle">
    <div class="bodytitleleft"></div>
    <div class="bodytitletxt">待审核会员</div>
    <!-- <div class="bodytitleright"></div>
    <div class="bodytitletxt2"><a href="../manage/addAdmin.jsp">新增</a></div> -->
  </div>
 
  <table cellpadding="0" cellspacing="0" border="0" id="table" class="sortable">
		<thead>
			<tr>
				<th class="nosort"><input type="checkbox" onclick="if(this.checked==true) { checkAll(); } else { clearAll(); }"  /> </th>
				<th class="nosort"><h3>单位名称</h3></th>
				<th><h3>专业类别</h3></th>
				<th><h3>经济性质</h3></th>
				<th><h3>企业等级</h3></th>
				<th class="nosort"><h3>详细信息</h3></th>
			</tr>
		</thead>
		<tbody>
		<s:iterator value="companyUserList">
			<tr>
				<td><input type="checkbox" name="r" value="<s:property value='user_id'/>"/> </td>
				<td><a href="#"><font size="2px"><s:property value="com_name"/></font></a></td>
				<td><font size="2px">
						<s:if test="com_type==1">包装机械</s:if>
						<s:elseif test="com_type==2">包装材料</s:elseif>
						<s:elseif test="com_type==3">包装制品</s:elseif>
						<s:elseif test="com_type==4">包装印刷</s:elseif>
						<s:elseif test="com_type==5">包装设计</s:elseif>
						<s:else>包装用户</s:else></font> 
				</td>
				<td>
					<font size="2px">
						<s:if test="">国有</s:if>
						<s:elseif test="economic_nature==1">集体</s:elseif>
						<s:elseif test="economic_nature==2">股份制</s:elseif>
						<s:elseif test="economic_nature==3">民营</s:elseif>
						<s:elseif test="economic_nature==4">中外合资</s:elseif>
						<s:else>其他</s:else></font> 
				</td>
				<td><s:property value='com_level'/></td>
				<td><img src="img/ico-edit.gif" onclick="location.href='../user/viewReCompanyUser.action?user_id=<s:property value='user_id'/>'" style="cursor: hand"/></td>
			</tr>
		</s:iterator>
		</tbody>
  </table>
	<div id="controls">
		<div id="perpage">
			<select onchange="sorter.size(this.value)" >
			    <option value="5">5</option>
				<option value="10" selected="selected">10</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
			</select>
			<span><font size="2px">输入分页条数</font></span>
		</div>
		<div id="navigation">
			<img src="../js/images/first.gif" width="16" height="16" alt="First Page" onclick="sorter.move(-1,true)" />
			<img src="../js/images/previous.gif" width="16" height="16" alt="First Page" onclick="sorter.move(-1)" />
			<img src="../js/images/next.gif" width="16" height="16" alt="First Page" onclick="sorter.move(1)" />
			<img src="../js/images/last.gif" width="16" height="16" alt="Last Page" onclick="sorter.move(1,true)" />
		</div>
		<div id="text"><font size="2px">显示页面： <span id="currentpage"></span> of <span id="pagelimit"></span> </font></div>
		<div><input type="button" value="审核通过" onclick="pass_confirm()"/><input type="button" value="审核不通过" onclick="unpass_confirm()"/></div>
	</div>
	<script type="text/javascript" src="../js/script.js"></script>
	<script type="text/javascript">
    var sorter = new TINY.table.sorter("sorter");
	sorter.head = "head";
	sorter.asc = "asc";
	sorter.desc = "desc";
	sorter.even = "evenrow";
	sorter.odd = "oddrow";
	sorter.evensel = "evenselected";
	sorter.oddsel = "oddselected";
	sorter.paginate = true;
	sorter.currentid = "currentpage";
	sorter.limitid = "pagelimit";
	sorter.init("table");<!-- sorter.init("table",0);参数表示选中第几列  -->
	sorter.size(10);
  </script>
  
  <script type="text/javascript">
<!--
function checkAll()
{	
    var page = document.getElementById("currentpage").innerHTML;
    var a = document.getElementsByTagName("select")
    var limit; 
    for(var i=0;i <a.length;i++) limit= a[i].value; 
	var el = document.getElementsByTagName('input');
	var len = el.length;
	var dataSize=<s:property value='companyUserList.size()'/>;
	for(var i=parseInt(limit)*parseInt(page-1); i<parseInt(limit)*parseInt(page-1)+parseInt(limit); i++)
	{
		if((el[i].type=="checkbox"))
		{
			el[i].checked = true;
		}
	}
}
function clearAll()
{
	var el = document.getElementsByTagName('input');
	var len = el.length;
	for(var i=0; i<len; i++)
	{
		if((el[i].type=="checkbox") )
		{
			el[i].checked = false;
		}
	}
}
//-->
</script>
</div>
</body>
</html>